package com.lianniu.web.tea.user.news.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lianniu.web.base.BaseResult;
import com.lianniu.web.tea.user.addr.model.TeaUserAddr;
import com.lianniu.web.tea.user.news.dao.TeaNewsMapper;
import com.lianniu.web.tea.user.news.model.TeaNews;
import com.lianniu.web.tea.user.news.service.ITeaNewsService;

@Service
@Transactional
public class TeaNewsServiceImpl implements ITeaNewsService {

	private final static Logger logger = Logger.getLogger(TeaNewsServiceImpl.class);
	
	@Autowired
	private TeaNewsMapper teaNewsMapper;
	
	@Override
	public BaseResult getUserNewsList(TeaNews teaNews) {
		logger.info("TeaNewsServiceImpl getUserNewsList start");
		Long userId = teaNews.getUserId();
		List<TeaNews> teaUserList = teaNewsMapper.getUserNewsListByUserId(userId);
		logger.info("TeaNewsServiceImpl getUserNewsList end");
		return BaseResult.success(teaUserList);
	}

}
